<?php
namespace App\Services\Fund;
use App\Services\Fund\FundRefundLog\FundRefundLogLogic;
/**
 * 资金还款日志
 * Class FundRefundLog
 * @package App\Services\Fund
 */
class FundRefundLog
{
    // 获取所资金还款日志(分页)
    public function list($data): array
    {
        $data = init_array($data,['page'=>'1', 'list_rows'=>'']);
        if (empty($data)) {
            return null_data($data,"参数不能为空！");
        }
        return (new FundRefundLogLogic())->list($data);
    }
    // 获取某些user_ids的的资金还款日志(分页)
    public function listByUserIds($data): array
    {
        $data = init_array($data,['page'=>'1', 'list_rows'=>'', 'user_ids'=>' ']);
        if (empty($data)) {
            return null_data($data,"参数不能为空！");
        }
        ValidateFundRefundLog::checkValidate($data, ['user_ids']);
        return (new FundRefundLogLogic())->listByUserIds($data);
    }
    // 获取某个借款日志的资金还款日志
    public function listByBorrowId($data): array
    {
        $data = init_array($data,['borrow_log_id'=>'0','page'=>'1', 'list_rows'=>'']);
        ValidateFundRefundLog::checkValidate($data, ['borrow_log_id']);
        return (new FundRefundLogLogic())->listByBorrowId($data);
    }

}